import sys

class Solution:
    def __init__(self, row, col, game_map):
        self.res_map = [[0] * col] * row
        self.game_map = game_map

    def get_path(self, time, pos):
        if pos[0] != 0:
            if res[pos[0] - 1][pos[1]] < res[pos[0]][pos[1]] + t:
                res[pos[0] - 1][pos[1]] = res[pos[0]][pos[1]] + t
        if pos[1] != 0:
            if res[pos[0]][pos[1] -1] < res[pos[0]][pos[1]] + t:
                pass



if __name__ == "__main__":
    # get map from input
    # fp = sys.stdin
    # line = fp.readline().split()
    # row, col, time = [int(e) for e in line]
    # game_map = []
    # for i in range(row):
    #     line = fp.readline().split()
    #     game_map.append([int(e) for e in line])
    # # print(row, col, time)
    
    game_map = [
        [3, 5, 4, 2, 3],
        [4, 5, 3, 4, 3],
        [4, 3, 5, 3, 2],
        [2, 5, 3, 3, 5],
        [5, 3, 4, 4, 1]
    ]
    s = Solution(game_map)
    print(s.get_path(5, 5, game_map, 30))

    # print(s.get_path(row, col, game_map, time))
